package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.PayChannel;
import com.nondo.dean.pay.domain.PayChannelExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface PayChannelMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=PayChannelSqlProvider.class, method="countByExample")
    long countByExample(PayChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=PayChannelSqlProvider.class, method="deleteByExample")
    int deleteByExample(PayChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_channel",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_channel (id, channel_id, ",
        "channel_name, channel_mch_id, ",
        "mch_id, state, param, ",
        "remark, create_time, ",
        "update_time)",
        "values (#{id,jdbcType=INTEGER}, #{channelId,jdbcType=VARCHAR}, ",
        "#{channelName,jdbcType=VARCHAR}, #{channelMchId,jdbcType=VARCHAR}, ",
        "#{mchId,jdbcType=VARCHAR}, #{state,jdbcType=TINYINT}, #{param,jdbcType=VARCHAR}, ",
        "#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(PayChannel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=PayChannelSqlProvider.class, method="insertSelective")
    int insertSelective(PayChannel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=PayChannelSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="param", property="param", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<PayChannel> selectByExampleWithRowbounds(PayChannelExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=PayChannelSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="param", property="param", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<PayChannel> selectByExample(PayChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "id, channel_id, channel_name, channel_mch_id, mch_id, state, param, remark, ",
        "create_time, update_time",
        "from pay_channel",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="param", property="param", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    PayChannel selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=PayChannelSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PayChannel record, @Param("example") PayChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=PayChannelSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PayChannel record, @Param("example") PayChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=PayChannelSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PayChannel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_channel
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_channel",
        "set channel_id = #{channelId,jdbcType=VARCHAR},",
          "channel_name = #{channelName,jdbcType=VARCHAR},",
          "channel_mch_id = #{channelMchId,jdbcType=VARCHAR},",
          "mch_id = #{mchId,jdbcType=VARCHAR},",
          "state = #{state,jdbcType=TINYINT},",
          "param = #{param,jdbcType=VARCHAR},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(PayChannel record);
}